﻿<script>
_run( function() {

	$('.deleteNotification').click( function() {
		var thisLine = $( '#' + $(this).attr( 'container' ) );

		var actionUrl = $(this).attr( 'action' ).toAjax();
		$.post( actionUrl, function(data) {
			if( 'ok'==data ) {
				thisLine.remove();
			}
			else {
				alert( data );
			}
		});
	});

});

</script>

<style>
.nfLine { border-bottom:1px #ccc dotted;}
table.nfLine:hover {	background:#fff;}
</style>


<div style="margin:3px 3px 3px 10px; font-size:12px; " class="tipPanel #{displayClass}">
	<div style="padding:5px 0px 5px 0px;">
	<!-- BEGIN notifications -->				
	<table style="width: 100%; border-bottom:1px #ddd dotted;" class="nfLine" id="nfLine#{notification.Id}">
			<tr>
				<td>#{notification.Msg}</td>
				<td style="width:20px;vertical-align:top;padding-top:5px;text-align:right"><img src="~img/delete.gif"  class="deleteNotification" container="nfLine#{notification.Id}" style="cursor:pointer" action="#{notification.ReadLink}"/></td>
			</tr>
			
			<!-- BEGIN friendCmd -->
			<tr>
			<td><div style="margin-left:20px;"><span href="#{notification.ApproveFriendLink}" class="putCmd">_{allow}</span> | <span href="#{notification.RefuseFriendLink}" class="putCmd">_{refuse}</span></div></td>
			<td></td>
			</tr>						
			<!-- END friendCmd -->						
	</table>				
	<!-- END notifications -->
	</div>
</div>
